﻿@model SpaceNeedle.City6473.WebSite.Models.EditUserModel
@using SpaceNeedle.City6473.Web.Data.Models

@{
    Layout = "~/Views/Shared/_Layout.cshtml";

    var staticContent = ViewBag.StaticContent as WebSiteContent;
    ViewBag.Title = staticContent.Users.PageTitle;
}


<h3>@staticContent.Operations.Edit</h3>
@using (Html.BeginForm())
{
    @Html.HiddenFor(model => model.OldEmail)
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)

    <div class="editor-label">
        @Html.Label(staticContent.Users.Name)
    </div>
    <div class="editor-field">
        @Html.TextBoxFor(model => model.Name, null, new { @class = "form-control" })
        @Html.ValidationMessageFor(model => model.Name)
    </div>

    <div class="editor-label">
        @Html.Label(staticContent.Users.Email)
    </div>
    <div class="editor-field">
        @Html.TextBoxFor(model => model.Email, null, new { @class = "form-control" })
        @Html.ValidationMessageFor(model => model.Email)
    </div>

    <div class="editor-label">
        @Html.Label(staticContent.Users.Roles)
    </div>
    <div class="editor-field">
        @Html.DropDownListFor(model => model.Roles, new SelectList(Model.AvaliableRoles, "Value", "Text", Model.Roles))
        @Html.ValidationMessageFor(model => model.Roles)
    </div>

    <div class="editor-label">
        @Html.Label(staticContent.Users.IsActive)
    </div>
    <div class="editor-field">
        @Html.CheckBoxFor(model => model.IsActive)
    </div>
    <br />
   
    <br />
    <p>
        <div class="btn btn-default">
            <button type="button" onclick="location.href='@Url.Action("Users", "Admin")'">
                @*<img src="~/Content/images/Back.png">*@ @staticContent.Operations.Back
            </button>
        </div>

        <div class="btn btn-default">
            <button type="submit" value="Create">
                @staticContent.Operations.Save
            </button>
        </div>
    </p>


}




